package com.test14.genericity;

public class Test03_hello {
	public static void function(Test03_info<? extends Number> temp) {
		System.out.println("内容::::;" + temp.getAge());
	}

	public static void main(String[] args) {
		Test03_info<Integer> demo = new Test03_info<>();
		demo.setAge(1);
		
		function(demo);
		
//		这里把是参数的泛型限定必须是Number及子类，所以下面的报错
		Test03_info<String> demo2 = new Test03_info<>();
		demo2.setAge("wangquan");
		
//		function(demo2);
	}
}